using zhwy.saas.api.Entity.Sys;

namespace zhwy.saas.api.Services.Sinterface.Sys
{
    /// <summary>
    /// 系统角色服务接口
    /// </summary>
    public interface ISysRoleService : IBaseService<RolesEntity>
    {
        /// <summary>
        /// 更新角色状态
        /// </summary>
        /// <param name="roleId">角色ID</param>
        /// <param name="status">新状态</param>
        /// <returns>是否更新成功</returns>
        Task<bool> UpdateStatusAsync(long roleId, int status);

        /// <summary>
        /// 获取指定用户的所有角色
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns>角色列表</returns>
        Task<List<RolesEntity>> GetRolesByUserIdAsync(long userId);

        /// <summary>
        /// 批量分配角色权限
        /// </summary>
        /// <param name="roleId">角色ID</param>
        /// <param name="permissionIds">权限ID列表</param>
        /// <returns>是否分配成功</returns>
        Task<bool> AssignPermissionsAsync(long roleId, List<long> permissionIds);

        /// <summary>
        /// 获取租户默认角色
        /// </summary>
        /// <returns></returns>
        Task<RolesEntity> GetTenantDefaultInfo();
    }
}